const rules = {
  platform: [
    {
      required: true,
      message: '所属端口不能为空',
      trigger: 'change'
    }
  ],
  tabCode: [
    {
      required: true,
      message: '请选择所属栏目',
      trigger: 'change'
    }
  ],
  title: [
    {
      required: true,
      message: '请输入标题名称',
      trigger: 'blur'
    },
    {
      min: 5,
      max: 30,
      message: '标题名称在5-30个字之间'
    }
  ],
  content: [
    {
      required: true,
      message: '请输入详情内容',
      trigger: 'blur'
    }
  ],
  sort: [
    {
      required: true,
      message: '排序不能为空',
      trigger: 'blur'
    },
    {
      pattern: /^[1-9]\d{0,3}$/,
      message: '请输入1-9999'
    }
  ],
  isRecommend: [
    {
      required: true,
      message: '请选择是否推荐',
      trigger: 'change'
    }
  ],
  isHidden: [
    {
      required: true,
      message: '请选择是否启用',
      trigger: 'change'
    }
  ]
}

export default rules
